import request from '@/utils/request'

// 查询站点列表
export function listNewsSite(query) {
  return request({
    url: '/partybuilding/NewsSite/list',
    method: 'get',
    params: query
  })
}

// 查询站点详细
export function getNewsSite(id) {
  return request({
    url: '/partybuilding/NewsSite/' + id,
    method: 'get'
  })
}

// 新增站点
export function addNewsSite(data) {
  return request({
    url: '/partybuilding/NewsSite/add',
    method: 'post',
    data: data
  })
}

// 修改站点
export function updateNewsSite(data) {
  return request({
    url: '/partybuilding/NewsSite/edit',
    method: 'post',
    data: data
  })
}

// 开启或关闭状态
export function editStatus(data) {
  return request({
    url: '/partybuilding/NewsSite/editStatus',
    method: 'post',
    data: data
  })
}

// 删除站点
export function delNewsSite(id) {
  return request({
    url: '/partybuilding/NewsSite/remove/' + id,
    method: 'post'
  })
}
